
package org.openhds.domain.model;

import java.io.Serializable;
import java.util.Calendar;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Past;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.openhds.domain.annotations.Description;
import org.openhds.domain.constraint.CheckEntityNotVoided;
import org.openhds.domain.constraint.CheckIndividualNotUnknown;
import org.openhds.domain.constraint.Searchable;


/**
 * Generated by JCodeModel
 * 
 */
@Description(description = "A Vaccination is filled out for ever Pregnancy Outcome. It contains a list of dates in which a child has received various immunications.")
@Entity
@Table(name = "vaccination")
@XmlRootElement(name = "vaccination")
public class Vaccination
    extends AuditableCollectedEntity
    implements Serializable
{

    public final static long serialVersionUID = 9088448901429863510L;
    @Searchable
    @CheckEntityNotVoided
    @CheckIndividualNotUnknown
    @ManyToOne
    @Description(description = "Individual receiving the vaccination, identified by the external id.")
    private Individual child;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "Bcg Date.")
    private Calendar bcg;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "1st polio.")
    private Calendar polio1;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "2nd polio.")
    private Calendar polio2;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "3rd polio.")
    private Calendar polio3;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "4th polio.")
    private Calendar polio4;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "1st dpt.")
    private Calendar dpt1;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "2nd dpt.")
    private Calendar dpt2;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "3rd dpt.")
    private Calendar dpt3;
    @Past
    @Temporal(TemporalType.DATE)
    @Description(description = "First child measels.")
    private Calendar measels;

    public Individual getChild() {
        return child;
    }

    public void setChild(Individual indiv) {
        child = indiv;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getBcg() {
        return bcg;
    }

    public void setBcg(Calendar date) {
        bcg = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getPolio1() {
        return polio1;
    }

    public void setPolio1(Calendar date) {
        polio1 = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getPolio2() {
        return polio2;
    }

    public void setPolio2(Calendar date) {
        polio2 = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getPolio3() {
        return polio3;
    }

    public void setPolio3(Calendar date) {
        polio3 = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getPolio4() {
        return polio4;
    }

    public void setPolio4(Calendar date) {
        polio4 = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getDpt1() {
        return dpt1;
    }

    public void setDpt1(Calendar date) {
        dpt1 = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getDpt2() {
        return dpt2;
    }

    public void setDpt2(Calendar date) {
        dpt2 = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getDpt3() {
        return dpt3;
    }

    public void setDpt3(Calendar date) {
        dpt3 = date;
    }

    @XmlJavaTypeAdapter(org.openhds.domain.util.CalendarAdapter.class)
    public Calendar getMeasels() {
        return measels;
    }

    public void setMeasels(Calendar date) {
        measels = date;
    }

}
